<?php $this->load->view('public/column_index_pubnav');?> 
	 
	 <div class="main">
	          <div class="special20">
	          			
			          <div id="span1">
			          <!-- 这个暂时没有时间做，先隐藏 -->
			          <!-- 
			          <p>排序：</p>
			          <p class="p2"><a href="choiceness.html">精选</a></p>
			          <p class="p3"><a href="up-to-date.html">最新</a></p>
			          <p class="p3"><a href="hore.html">24小时最新</a></p>
			          -->
			          <!-- 隐藏结束 -->
			          </div>
					  
					   <div class="clr1"></div>
					   
					  <div id="span2">全部：</div>   

                      <div class="rdivbox">
					  
					  <div class="span3">
					  <?php if(!empty($cloth_class)) {foreach ($cloth_class as $cck => $ccv){
						   $baby_type = $this->baby_type->get_list(array('cloth_class_id'=>$ccv['id']));
	                       if(!empty($baby_type)){foreach($baby_type as $btk => $btv){
                       ?>
					  <p class="p6"><a href="<?php echo base_url().'index/baby_list/sonclass/'.$btv['id'];?>"><?php echo $btv['name'];?></a></p>
					  <?php }}}}?>

					  </div> 
					  </div> 
					  
					  <div class="clr1"></div>
					  
					  <span id="span4"><img src="http://img03.taobaocdn.com/tps/i3/T13D7xXhVfXXaCwpjX.png" width="328"></span>
			  </div>
				
				<?php if(!empty($result)){foreach($result as $colk => $colv){?>
        		<div class="special20" onmouseover="this.className='special30'" onmouseout="this.className='special20'">
			        <div class="special21">
				        <div class="tspecial1"><a href="<?php echo base_url().'column/detail/'.$colv['id'];?>"><?php echo $colv['title'];?></a></div>
	                	<div class="tspecial22"><font color="#FF0000"><?php echo count($this->like_baby->get_list(array('column_id'=>$colv['id'])));?></font>个宝贝</div>
					</div>
				    <div class="clr1"></div>
				    <div class="bspecial">
			           <div class="bspecial1">
				           <a href="<?php echo base_url().'column/detail/'.$colv['id'];?>">
	                        <img src="<?php if(!empty($colv['img'])){echo base_url().'upload/column/'.$colv['img'];}else{echo 'http://img01.taobaocdn.com/bao/uploaded/i1/T1sounXnXDXXXJzTs5_060202.jpg_210x1000.jpg';}?>" width="169px" height="190px" />
	                       </a>
                       </div>
						   <div class="bspecial2">
							   <?php
			                        $baby = $this->like_baby->get_list(array('column_id'=>$colv['id']),6);
			                        $column_member = $this->member->get_one_list($colv['memberid']);
			                        if(!empty($baby)){foreach($baby as $babyk => $babyv){
			                            $one_baby = $this->baby->get_one_list($babyv['baby_id']);
			                            if (!empty($one_baby)){		                            	
	                        	?>
	                            <div class="bspecial5"><a href="<?php echo base_url().'index/baby_detail/'.$one_baby['id'];?>"><img src="<?php echo base_url().'upload/baby/'.$one_baby['small_img'];?>" width="60px" height="60px"/></a></div>
	                        	<?php }}}?>								          
						  </div>
						  <!-- 
						  <div class="bspecial3">
						         <div class="bspecial7"><img src="<?php echo base_url();?>images/publick/heart.gif" />1</div>
								 <div class="bspecial8"><img src="<?php echo base_url();?>images/publick/msg.gif" />评论</div>
						  </div>
						   -->
				   </div>
				   <div class="dspecia1">
				          <div class="dspecia2">
				          <a href="<?php echo base_url('column/center').'/'.$colv['memberid'];?>">
				          <img width="30px" height="30px" src="<?php if(!empty($column_member['img'])) {echo base_url().'upload/avator/'.$column_member['img'];}else{ echo 'http://assets.taobaocdn.com/app/sns/img/default/avatar-60.png'; }?>"/>
				          </a>
				          </div>
						  <div class="dspecia5">
							  <div class="dspecia3">
							  <a href="<?php echo base_url('column/center').'/'.$colv['memberid'];?>">
							  <font color="#FF0000"><?php echo $column_member['name'];?></font>
							  </a>
							  </div>
							  <?php 
								  //计算修改专辑时间
								  if($colv['updatetime']){
								  	$second = (time()-strtotime($colv['updatetime']));  //秒
								  	$minute = floor($second/60);  //分，取整
								  	$hour = floor($minute/60);  //小时，取整
								  	$day = floor($hour/24);  //天，取整
								  	if($second < 60) $edit_time = $second."秒前";
								  	elseif ($minute < 60 && $second > 60) $edit_time = $minute."分钟前";
								  	elseif ($hour < 24 && $minute > 60) $edit_time = $hour."小时前";
								  	else $edit_time = $day."天前";
								  }else{
								  	$edit_time = "刚刚";
								  }							  
							  ?>
	                    	  <div class="dspecia3"><font color="#999999"><?php echo $edit_time;?>&nbsp;修改了专辑</font></div>
						  </div>
				   </div>
				</div>						
    <?php }}?>
	 </div>
</div>
<?php $this->load->view('public/personal_pubfooter');?>